# -*- coding: utf-8 -*-
"""
Created on Tue Jun  5 21:16:41 2018

@author: sun haiyang
"""
#%%

from agilepipe.statics.acrossvoxelgroupcorrelate_pearson import Multi_across_voxel_correlate
# the code below is the result filepath of kinds of modality

zpet_dirpath = r'/media/root/Elements4/XuanWu_z_sm666_pearson_1002/PET_processing/PET_normalised_resliced_smoothed_Zstandardized'
zcbf_dirpath = r'/media/root/Elements4/XuanWu_z_sm666_pearson_1002/CBF_processing/CBF_clear_background_SN_SR_SSM-6_z'
zfalff_dirpath = r'/media/root/Elements4/XuanWu_z_sm666_pearson_1002/BOLD_processing/fALFF_z'
zperalff_dirpath = r'/media/root/Elements4/XuanWu_z_sm666_pearson_1002/BOLD_processing/PerAF'
zreho_dirpath = r'/media/root/Elements4/XuanWu_z_sm666_pearson_1002/BOLD_processing/ReHo_z'

#the code below is the groupmask filepath of kinds of modality
gray_region_mask_dirpath = r'/media/root/Elements4/XuanWu_dpabi_spm/mask/Yeo_template/intersect_mask'
#此文件夹下是p=0.4/0.5...0.9的文件夹，而p=0.4这个文件夹下是region=1 2 3...7的文件夹，1文件夹下是26个subject的mask

output_dirpath = r'/media/root/Elements4/XuanWu_z_sm666_pearson_1002'

#the code below is the used as the excel title.
column_name_list = ['coeff','pvalue','modality','maskdirname','GM_Probability'] #must set value ,even set column_name_list =[]

grouppath_dict = {'PET/CBF':[zpet_dirpath,zcbf_dirpath,gray_region_mask_dirpath,output_dirpath],\
                 'PET/fALFF':[zpet_dirpath,zfalff_dirpath,gray_region_mask_dirpath,output_dirpath],\
                 'PET/perALFF':[zpet_dirpath,zperalff_dirpath,gray_region_mask_dirpath,output_dirpath],\
                 'PET/ReHo':[zpet_dirpath,zreho_dirpath,gray_region_mask_dirpath,output_dirpath],\
                 'CBF/fALFF':[zcbf_dirpath,zfalff_dirpath,gray_region_mask_dirpath,output_dirpath],\
                 'CBF/perALFF':[zcbf_dirpath,zperalff_dirpath,gray_region_mask_dirpath,output_dirpath],\
                 'CBF/ReHo':[zcbf_dirpath,zreho_dirpath,gray_region_mask_dirpath,output_dirpath] }
print('grouppath_dict:',grouppath_dict)

Multi_across_voxel_correlate([grouppath_dict,column_name_list])

#%%